/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package agents;

import ai1.Enviroment;
import java.util.Scanner;

/**
 *
 * @author orcas
 */
public class HumanAgent extends Agent {

    public HumanAgent(String name, int row, int col, String orientation) {
        super(name, row, col, orientation);
    }

    public String getMove(Enviroment env) {
        System.out.println(getName()+" @ "+getRow()+", "+getCol()+" facing "+getOrientation()+": please enter W/A/D");
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.startsWith("W") || s.startsWith("w")) {
            return "FWD";
        }
        if (s.startsWith("D") || s.startsWith("d")) {
            return "RIGHT";
        }
        if (s.startsWith("A") || s.startsWith("a")) {
            return "LEFT";
        }
        if (s.equals("q")) {
            System.exit(0);
        }
        return null;
    }
}
